package com.mycompany.behavior;



import org.apache.wicket.Component;
import org.apache.wicket.behavior.AbstractBehavior;
import org.apache.wicket.markup.ComponentTag;
import org.apache.wicket.markup.html.form.FormComponent;

public class ValidationStyleBehavior extends AbstractBehavior
{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public void onComponentTag(final Component component, final ComponentTag tag)
	{
		tag.getAttributes().put("class", "obligatorioTextField");		
	
		super.onComponentTag(component, tag);
		
//		FormComponent comp = (FormComponent) component;
//				if (comp.isValid() && comp.getConvertedInput() != null) {
//			tag.getAttributes().put("class", "valid");
//		} else if (!comp.isValid()) {
//			tag.getAttributes().put("class", "invalid");
//		}
	}
};
